<template>
  <div class="partCirculateHandle">
    <!-- <p>借还类型</p>
    <br />-->
    <LazyLoadTab v-model="activeName" :tabMenus="menus"></LazyLoadTab>
    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 9,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right'
      }"
    >
      <el-button v-if="type !== 'show'" type="primary" @click="alterSave">保 存</el-button>
      <el-button v-if="type !== 'show'" type="primary" @click="alterHandle">处理库存</el-button>
      <el-button @click="closeDialog">取 消</el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'partCirculateHandle',
  props: {
    type: {
      type: String,
      default: 'add'
    },
    rowData: {
      type: Object,
      default: () => ({})
    }
  },
  data() {
    return {
      activeName: '借入入库',
      menus: [
        {
          title: '借入入库',
          path: 'part/partOther/partCirculateHandle/borrowIn/index',
          params: { rowData: this.rowData }
        },
        {
          title: '还出出库',
          path: 'part/partOther/partCirculateHandle/returnOut/index',
          params: { rowData: this.rowData }
        },
        {
          title: '借出出库',
          path: 'part/partOther/partCirculateHandle/borrowOut/index',
          params: { rowData: this.rowData }
        },
        {
          title: '还入入库',
          path: 'part/partOther/partCirculateHandle/returnIn/index',
          params: { rowData: this.rowData }
        }
      ]
    };
  },
  methods: {
    alterSave() {},
    alterHandle() {},
    closeDialog(val, type) {
      this.$emit('close', val, type);
    }
  }
};
</script>

<style lang="less" scoped></style>
